/**
 * 
 */
package com.xinnet.mms.enums;


/**
 * 业务类型枚举
 * @author 王志军
 * @author $Author:$
 * @version $Revision:$ $Date:$ 
 * @since 2016-1-13
 * 
 */
public enum ConsumeBusinessTypeEnmu {
	//新开、续费、退费
	NEW(1,"新开"),
	RENEW(2,"续费"),
	REFUND(3,"退费");
	
	private Integer value;
	
	private String label;
	
	private ConsumeBusinessTypeEnmu(Integer value, String label){
		this.value = value;
		this.label = label;
	}
	
	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}
	
	
	/**
	 * 根据value获取对应的枚举
	 * @param value
	 * @return
	 */
	public static ConsumeBusinessTypeEnmu getAllotTypeEnmuByValue(Integer value){
		ConsumeBusinessTypeEnmu[] custEnums = ConsumeBusinessTypeEnmu.values();
		for (ConsumeBusinessTypeEnmu custEnum : custEnums) {
			if(custEnum.getValue().equals(value)){
				return custEnum;
			}
		}
		return null;
	}
}
